﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

class MyPrizeBean
{
	public $userid;
	public $result;
	function __construct($userid,$result)
	{
		$this->userid      = $userid;
		$this->result      = $result;
		
	}
}




 
	$rert30=mysql_query("select *from user where  weibo ='".$_REQUEST['userid']."'");
	
	$prize = array();
	
$rowf=mysql_fetch_array($rert30);
 if($rowf!=false)
 {
 $false=100; $userid=$rowf[userid];
 }
 else
 {
  $false=100;
  
  $srat=mysql_query("INSERT INTO user(weibo) VALUES ('$_REQUEST[userid]')");
   $userid=mysql_insert_id();
 }

		  
		  
			$prize[] = new MyPrizeBean($userid,$false);
		
	

echo json_encode($prize);


?>